﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ManagerCustomer.aspx.cs"
    Inherits="WXYW.ManagerCustomer" Title="客户资料管理" %>

<%@ Register Namespace="WXYW.Controls" TagPrefix="WXYWControl" Assembly="WXYW.Common" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    客户管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
 关键字<asp:TextBox ID="keyWordTextBox" runat="server" Height="16px" onkeypress="enterTxtBox('searchLinkButton')"></asp:TextBox><asp:LinkButton
        ID="searchLinkButton" runat="server" OnClick="searchLinkButton_Click">查询</asp:LinkButton><asp:LinkButton
            ID="resetLinkButton" runat="server" OnClick="resetLinkButton_Click">清除</asp:LinkButton>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
    <WXYWControl:CustomGridView ID="customerGridView" runat="server" AutoGenerateColumns="False"
        OnRowDataBound="customerGridView_RowDataBound" AllowPaging="True" PageSize="20"
        CssClass="tableList" Width="100%" OnRowCommand="customerGridView_RowCommand"
        OnPageIndexChanging="customerGridView_PageIndexChanging" OnMustAddARow="GridView_MustAddARow"
        OnDataBound="sparePartApplyFormsGridView_DataBound">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="UserID" HeaderText="用户ID">
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField HeaderText="用户类型" DataField="UserType">
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:BoundField>
            <asp:BoundField HeaderText="用户名称" DataField="FullName">
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField HeaderText="联系人" DataField="ContactName">
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="联系方式">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("MobilePhone") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <table border="0px" cellpadding="0" cellspacing="0" style="border-style: none">
                        <tr style="border-style: none; text-align: left; height: 20px">
                            <td style="border-style: none">
                                联系手机：
                            </td>
                            <td style="border-style: none; text-align: left">
                                <%#Eval("MobilePhone")%>
                            </td>
                        </tr>
                        <tr style="border-style: none; text-align: left; height: 20px">
                            <td style="border-style: none">
                                联系电话：
                            </td>
                            <td style="border-style: none; text-align: left">
                                <%#Eval("UserPhone")%>
                            </td>
                        </tr>
                        <tr style="border-style: none; text-align: left; height: 20px">
                            <td style="border-style: none">
                                邮件地址：
                            </td>
                            <td style="border-style: none; text-align: left">
                                <%#Eval("Email")%>
                            </td>
                        </tr>
                        <tr style="border-style: none; text-align: left; height: 20px">
                            <td style="border-style: none">
                                通讯地址：
                            </td>
                            <td style="border-style: none; text-align: left">
                                <%#Eval("Address")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle HorizontalAlign="Left" Wrap="False" />
            </asp:TemplateField>
            <asp:BoundField DataField="Station" HeaderText="所属平台">
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="查看" ShowHeader="False">
                <ItemTemplate>
                    <img src="image/operateicon/docedit.gif" alt="" />
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="EditUser"
                        Text="修改" CommandArgument='<%#Eval("ID") %>'></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="删除" ShowHeader="False">
                <ItemTemplate>
                    <img src="image/operateicon/docdelete.gif" alt="" />
                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" CommandName="DeleteUser"
                        Text="删除" CommandArgument='<%#Eval("ID") %>' OnClientClick="javascript:return confirm('确定要删除这个用户吗?')"></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
        </Columns>
        <AlternatingRowStyle BackColor="#CCCCFF" />
        <PagerTemplate>
            本类记录<span style="color: Red"><%= RecordsNumber%></span>条, <span style="color: Red">20</span>条/页
            当前 <span style="color: Red">
                <%= customerGridView.PageIndex + 1%>/<%= customerGridView.PageCount%></span>页
            <asp:LinkButton CommandName="Page" CommandArgument="First" ID="LinkButton1" runat="server"
                Style="color: blue">首页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Prev"
                    ID="LinkButton2" runat="server" Style="color: blue">|上一页</asp:LinkButton>
            <asp:LinkButton CommandName="Page" CommandArgument="Next" ID="LinkButton3" runat="server"
                Style="color: blue">下一页</asp:LinkButton><asp:LinkButton CommandName="Page" CommandArgument="Last"
                    ID="LinkButton4" runat="server" Style="color: blue">|尾页</asp:LinkButton>
            转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
            </asp:DropDownList>
        </PagerTemplate>
        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#A55129"></HeaderStyle>
    </WXYWControl:CustomGridView>
    <asp:Label ID="MsgLbl" runat="server" ForeColor="Red"></asp:Label>
</asp:Content>
